/* cl.ext.rsa 0.1*/
(
	function (factory) {
		if (typeof define === 'function' && define.amd) {
			define(['jquery',"rsa.jsbn","rsa.prng4","rsa.rng","rsa.rsa","rsa.base64"], function($) {
				factory($);
			});
		} else if (typeof module === 'object' && module.exports) {
			module.exports = function( root, jQuery ) {
				if ( jQuery === undefined ) {
					if ( typeof window !== 'undefined' ) {
						jQuery = require('jquery');
					}
					else {
						jQuery = require('jquery')(root);
					}
				}
				factory(jQuery);
			};
		} else {
			factory(jQuery);
		}
	}(
	function ($){
		var RsaExtModal = function() {};
		RsaExtModal.prototype = {
			getEncrypt:function(password,modulus,exponent){
				var rsaKey = new RSAKey();
				rsaKey.setPublic(b64tohex(modulus), b64tohex(exponent));
				var enPassword = hex2b64(rsaKey.encrypt(password));
				return enPassword;
			}
		};
		$.ExtRsa = new RsaExtModal;
		$.ExtRsa.Constructor = RsaExtModal;
	})
);